// 缓存
export const storage = {
  set(paramName, value) {
    localStorage.setItem(paramName, typeof value === 'string' ? value : JSON.stringify(value));
  },
  get(paramName) {
    const val = localStorage.getItem(paramName);
    if (val === null) return null;
    if (typeof JSON.parse(val) === 'string')  return val;
    return JSON.parse(val);
  }
}